import re

query=raw_input('Please Enter Query:')
regex=re.compile(r'\b'+query+r'\b')
f=open('./../tab')
for line in f:
    if regex.search(line):
        print line.split('\t')[0]   